package com.mav.mapper;

import com.mav.pojo.Emp;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@Mapper
public interface EmpMapper {

    List<Emp> list(String name, Integer gender, LocalDate begin, LocalDate end);
    void insert(Emp emp);

    void deleteById(List<Integer> ids);

    Emp getById(Integer id);

    void updateById(Emp emp);

    @Select("select * from emp")
    List<Emp> findAll();

    @Select("select * from emp where username=#{username} and password=#{password}")
    Emp getByUsernameAndPassword(Emp emp);
    
    
    List<Map<String, Object>> CountEmpJobData();

    List<Map<String, Object>> CountEmpGenderData();
}
